package com.provider.controller;


import com.provider.entity.*;
import com.provider.service.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 桶(TBucket)表控制层
 *
 * @author makejava
 * @since 2024-04-26 14:24:55
 */
@RestController
@RequestMapping("bucket")
public class TBucketController {


    @Resource
    TProjectService projectService;
    @Resource
    TProductEpicService productEpicService;

    @Resource
    TProductStoryService productStoryService;

    @Resource
    TProductTaskService productTaskService;

    @Resource
    private TBucketService bucketService;

    @Resource
    TProjectDemandPoolService projectDemandPoolService;
    @Resource
    TProductDemandPoolService productDemandPoolService;

    @Resource
    TPlaneService planeService;
    @Resource
    TEpicService epicService;

    @Resource
    TStoryService storyService;

    @Resource
    TTaskService taskService;
    @Resource
    VUserDataService userDataService;


    @Resource
    TProductService productService;

    @Resource
    TProductPlaneService productPlaneService;

    @PostMapping("queryBucketByProductId")
    public List<TBucket> queryBucketByProductId(String productId) {
        return bucketService.queryByProjectId(productId);
    }

    @PostMapping("queryBucketByProjectId")
    public List<TBucket> queryBucketByProjectId(String projectId) {
        return bucketService.queryByProjectId(projectId);
    }

    @PostMapping("queryAllBucket")
    public List<TBucket> queryAllBucket() {
        return bucketService.queryAllBucket();
    }

    @PostMapping("queryBucketFileByProjectId")
    public List<TBucketFile> queryBucketFileByProjectId(String projectId) {
        return bucketService.queryBucketFileByProjectId(projectId);
    }

    @PostMapping("queryAllBucketFile")
    public List<TBucketFile> queryAllBucketFile() {
        return bucketService.queryAllBucketFile();
    }

    @PostMapping("queryAllProjectDemand")
    public List<TProjectDemandPool> queryAllProjectDemand() {
        return projectDemandPoolService.queryAllProjectDemand();
    }

    @PostMapping("queryProjectDemandByProjectId")
    public List<TProjectDemandPool> queryProjectDemandByProjectId(String projectId) {
        return projectDemandPoolService.queryProjectDemandByProjectId(projectId);
    }

    @PostMapping("queryAllProductDemand")
    public List<TProductDemandPool> queryAllProductDemand() {
        return productDemandPoolService.queryAllProductDemand();
    }

    @PostMapping("queryProductDemandByProductId")
    public List<TProductDemandPool> queryProductDemandByProductId(String productId) {
        return productDemandPoolService.queryProductDemandByProductId(productId);
    }


    @PostMapping("queryAllEpic")
    public List<TEpic> queryAllEpic() {
        return epicService.queryAllEpic();
    }

    @PostMapping("queryAllStory")
    public List<TStory> queryAllStory() {
        return storyService.queryAllStory();
    }

    @PostMapping("queryAllTask")
    public List<TTask> queryAllTask() {
        return taskService.queryAllTask();
    }

    @PostMapping("queryEpicBySystemId")
    public List<TEpic> queryEpicBySystemId(String systemId) {
        return epicService.queryEpicBySystemId(systemId);
    }

    @PostMapping("queryStoryBySystemId")
    public List<TStory> queryStoryBySystemId(String systemId) {
        return storyService.queryStoryBySystemId(systemId);
    }

    @PostMapping("queryTaskBySystemId")
    public List<TTask> queryTaskBySystemId(String systemId) {
        return taskService.queryTaskBySystemId(systemId);
    }


    @PostMapping("queryProductEpicBySystemId")
    public List<TProductEpic> queryProductEpicBySystemId(String systemId) {
        return productEpicService.queryProductEpic(systemId);
    }

    @PostMapping("queryProductStoryBySystemId")
    public List<TProductStory> queryProductStoryBySystemId(String systemId) {
        return productStoryService.queryProductStory(systemId);
    }

    @PostMapping("queryProductTaskBySystemId")
    public List<TProductTask> queryProductTaskBySystemId(String systemId) {
        return productTaskService.queryProductTask(systemId);
    }


    @PostMapping("queryProjectPlanBySystemId")
    public TPlane queryProjectPlanBySystemId(String systemId) {
        return planeService.queryProjectPlanBySystemId(systemId);
    }

    @PostMapping("queryAllProjectPlan")
    public List<TPlane> queryAllProjectPlan() {
        return planeService.queryAllProjectPlan();
    }


    @PostMapping("queryProductPlanBySystemId")
    public List<TProductPlane> queryProductPlanBySystemId(String systemId) {
        return productPlaneService.queryProductPlanBySystemId(systemId);
    }

    @PostMapping("queryAllProductPlan")
    public List<TProductPlane> queryAllProductPlan() {
        return productPlaneService.queryAllProductPlan();
    }

    @PostMapping("queryAllUser")
    public List<VUserData> queryAllUser() {
        return userDataService.queryAllUser();
    }

    @PostMapping("queryAllProject")
    public List<TProject> queryAllProject() {
        return projectService.queryAllProject();
    }


    @PostMapping("queryAllProduct")
    public List<TProduct> queryAllProduct() {
        return productService.queryAllProduct();
    }

    @PostMapping("queryAllKeys")
    public List<String> queryAllKeys() {
        return projectService.queryAllKeys();
    }
}

